import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

import '../barChart.dart';
import '../lineChart.dart';
import '../main.dart';
import '../pieChart.dart';
import '../radarChart.dart';

class MyRoute{

  static final GoRouter router = GoRouter(
    routes: <RouteBase>[
      GoRoute(
        path: '/',
        builder: (BuildContext context, GoRouterState state) {
          return  const MyHomePage(title: '',);
        },
        routes: <RouteBase>[
          GoRoute(
            path: 'lineChart',
            builder: (BuildContext context, GoRouterState state) {
              return  const LineChartWidget();
            },
          ),
          GoRoute(
            path: 'barChart',
            builder: (BuildContext context, GoRouterState state) {
              return const BarChartWidget();
            },
          ),
          GoRoute(
              path: "pieChart",
              builder: (BuildContext context, GoRouterState state) {
                return const PieChartWidget();
              }),
          GoRoute(
              path: "radarChart",
              builder: (BuildContext context, GoRouterState state) {
                return const RadarChartWidget();
              }),
        ],
      ),

    ],
  );

}